webpackJsonp([44],{

/***/ "WchF":
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),

/***/ "Zdup":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/regenerator/index.js
var regenerator = __webpack_require__("lC5x");
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__("KH7x");
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("J0Oq");
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);

// EXTERNAL MODULE: ./src/common/api/commonApi.js
var commonApi = __webpack_require__("+/+p");

// CONCATENATED MODULE: ./node_modules/_babel-loader@7.1.5@babel-loader/lib!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=script&index=0!./src/common/anjian/dangerCheck/detail.vue



//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//


var LEVEL = [{
  D_text: '一般隐患',
  D_code: 1
}, {
  D_text: '重大隐患',
  D_code: 2
}];
var STATE = {
  1: '未整改',
  3: '已整改'
};
/* harmony default export */ var detail = ({
  data: function data() {
    return {
      STATE: STATE,
      level: LEVEL,
      item: {},
      listLevelDic: [],
      dangerTypeDic: [],
      uploadFile: function uploadFile() {}
    };
  },
  activated: function activated() {
    this.getData();
  },

  methods: {
    getData: function getData() {
      var _this = this;

      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
        var _ref, _ref2, dic, dic2;

        return regenerator_default.a.wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                _context.next = 2;
                return commonApi["a" /* commonApi */].dictionaries(['hierarchy', 'danger_hidden']);

              case 2:
                _ref = _context.sent;
                _ref2 = slicedToArray_default()(_ref, 2);
                dic = _ref2[0];
                dic2 = _ref2[1];

                _this.item = _this.$route.params;

                _this.listLevelDic = dic;
                _this.dangerTypeDic = dic2;

              case 9:
              case 'end':
                return _context.stop();
            }
          }
        }, _callee, _this);
      }))();
    },
    getLevel: function getLevel(level) {
      if (!level) return;
      var item = this.level.filter(function (item) {
        return item.D_code === level;
      });
      return item.D_text;
    },
    getListLevelVal: function getListLevelVal(listLevel) {
      if (!this.listLevelDic.length) return;
      var item = this.listLevelDic.filter(function (item) {
        return item.D_code === listLevel;
      });
      return item.D_text;
    },
    getDangerTypeVal: function getDangerTypeVal(dangerType) {
      if (!this.dangerTypeDic.length) return;
      var item = this.dangerTypeDic.filter(function (item) {
        return item.D_code === dangerType;
      });
      return item.D_text;
    },
    handlerTap: function handlerTap(file) {
      if (!file.url) {
        Toast('文件不存在', 'tool');
      } else if (isImg(file.name)) {
        PreviewImg({ current: 0, list: [file.url] });
      } else if (isVideo(file.name)) {
        PreviewVideo({
          current: 0,
          list: [{ title: file.name, url: file.url }]
        });
      } else {
        bridge.PreviewFile({ title: file.name, url: file.url });
      }
    }
  }
});
// CONCATENATED MODULE: ./node_modules/_vue-loader@13.7.3@vue-loader/lib/template-compiler?{"id":"data-v-5119c8e0","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=template&index=0!./src/common/anjian/dangerCheck/detail.vue
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('yt-page',{attrs:{"title":"隐患详情","scroll":""}},[_c('yt-card',{attrs:{"title":"基础信息"}},[_c('yt-cell',{attrs:{"label":"企业名称","value":_vm.item.enterprise_name ? _vm.item.enterprise_name.attributes.EnterpriseName : ''}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"检查时间","value":_vm.item.check_time}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"检查人","value":_vm.item.check_person}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"层级","value":_vm.getListLevelVal(_vm.item.list_level)}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"隐患级别","value":_vm.getLevel(_vm.item.Hidden_danger_level)}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"隐患类别","value":_vm.getDangerTypeVal(_vm.item.danger_type)}}),_vm._v(" "),_c('yt-textarea',{attrs:{"disabled":"","title":"隐患内容","border":"half"},model:{value:(_vm.item.text),callback:function ($$v) {_vm.$set(_vm.item, "text", $$v)},expression:"item.text"}})],1),_vm._v(" "),_c('yt-card',{attrs:{"title":"其他信息"}},[_c('yt-cell',{attrs:{"label":"整改部门","value":_vm.item.rectificationDepartment}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"整改负责人","value":_vm.item.rectificationPersonInCharge}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"限期整改时间","labelWidth":"150px","value":_vm.item.deadlineForRectification}}),_vm._v(" "),_c('yt-cell',{attrs:{"label":"整改前照片"}}),_vm._v(" "),_c('yt-file',{attrs:{"uploadFile":_vm.uploadFile,"disabled":true},model:{value:(_vm.item.files),callback:function ($$v) {_vm.$set(_vm.item, "files", $$v)},expression:"item.files"}})],1)],1)}
var staticRenderFns = []
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ var dangerCheck_detail = (esExports);
// CONCATENATED MODULE: ./src/common/anjian/dangerCheck/detail.vue
function injectStyle (ssrContext) {
  __webpack_require__("WchF")
}
var normalizeComponent = __webpack_require__("C7Lr")
/* script */


/* template */

/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = injectStyle
/* scopeId */
var __vue_scopeId__ = "data-v-5119c8e0"
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  detail,
  dangerCheck_detail,
  __vue_template_functional__,
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)

/* harmony default export */ var anjian_dangerCheck_detail = __webpack_exports__["default"] = (Component.exports);


/***/ })

});